package com.jiyinit.web.core.video.enums;

/**
 * Created by user1 on 2018/12/11.
 */
public enum IconEnums {

    RIZHI("1", "日志"),
    RENWU("2", "简单任务"),
    KAOQIN("3", "考勤"),
    QINGJIA("4", "请假"),
    SHENPI("5", "审批"),
    XIANGMU("6", "项目"),
    TONGZHI("7", "通知"),
    KAIZHIBO("8", "开直播"),
    KANZHIBO("9", "看直播"),
    JIANBUZOU("10", "健步走"),
    JIAOLIUYUANDI("11", "交流园地"),
    CHUCHAI("12", "出差"),
    GONGZITIAO("13", "工资条"),
    CHUQIN("14", "出勤"),
    LANQIANG("15", "蓝墙"),
    ;

    private String code;
    private String name;

    IconEnums(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getCodeByName(String name){
        for(IconEnums array : IconEnums.values()){
            if(array.getName().equals(name)){
                return array.getCode();
            }
        }
        return null;
    }

    public static String getNameByCode(String code){
        for(IconEnums array : IconEnums.values()){
            if(array.getCode().equals(code)){
                return array.getName();
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
